home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Linux Cubed Series 7: Sunsite
/
Linux Cubed Series 7 - Sunsite Vol 1.iso
/
system
/
news
/
readers
/
skim-0.8
/
skim-0
/
skim-0.8.4
/
VarBuf.h
< prev
next >
Wrap
C/C++ Source or Header
|
1996-02-18
|
3KB
|
83 lines
/*
* NAME
* VarBuf.h
* COPYRIGHT
* VarBuf - Variable size buffer ADT.
* Copyright (C) 1996 Rene W.J. Pijlman
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* VERSION
* $Header: /home/rene/sys/CVS_MasterSourceRepository/skim/VarBuf.h,v 1.8 1996/02/16 23:10:56 rene Exp $
* Distributed with Skim version 0.8.4.
*/
#ifndef _VARBUF_H_
#define _VARBUF_H_
#include <stdarg.h>
#include <stdlib.h>
#include "Types.h"
#include "StandardIO.h"
typedef int (*VBCompareFunction)( VarBuf, VarBuf );
/* Create and destroy. */
VarBuf VBCreate( void );
VarBuf VBCreateString( const char * );
VarBuf VBClone( VarBuf );
void VBDestroy( VarBuf );
/* Adding stuff. */
void VBAppendString( VarBuf, const char * );
void VBAppendCharacter( VarBuf, const char );
void VBPrintf( VarBuf, const char *, ...);
void VBPrintfVA( VarBuf, const char *, va_list );
void VBAppendVB( VarBuf, VarBuf );
void VBAppendBytes( VarBuf, void *, size_t );
void VBAppendVBReference( VarBuf , VarBuf );
void VBAppendVoidPtr( VarBuf , void * );
/* I/O. */
#define WITH_NEWLINE True
#define WITHOUT_NEWLINE False
Boolean VBReadLine( VarBuf, StandardIO, Boolean );
void VBReadFile( VarBuf, StandardIO );
void VBWriteFile( VarBuf, StandardIO );
/* Queries. */
Boolean VBIsOK( VarBuf );
void * VBAddress( VarBuf );
char * VBAsString( VarBuf );
size_t VBSize( VarBuf );
Natural VBNumberOfLines( VarBuf );
/* VB manipulation. */
void VBReset( VarBuf );
void VBShiftLeft( VarBuf, size_t );
void VBShiftRight( VarBuf, size_t, char );
void VBTruncate( VarBuf, size_t );
void VBFixSize( VarBuf , size_t , char );
void VBRemoveLeadingBlanks( VarBuf );
void VBRemoveTrailingBlanks( VarBuf );
void VBSplitAtOffset( VarBuf In, size_t Offset, VarBuf Part1, VarBuf Part2 );
void VBEndWithNewline( VarBuf );
/* Utilities. */
void VBSortArrayOfVB( VarBuf Array, VBCompareFunction UserCompare );
#endif